// SpringFunction.h: interface for the SpringFunction class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SPRINGFUNCTION_H__43CA574D_AE80_4335_981E_D3F64A355717__INCLUDED_)
#define AFX_SPRINGFUNCTION_H__43CA574D_AE80_4335_981E_D3F64A355717__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class SpringSelRegular;
#include "Spring.h"
#include "Variable.h"
#include "FunctionObject.h"

class AFX_EXT_CLASS SpringFunction : public FunctionObject  
{
	DECLARE_DYNAMIC_CREATE(SpringFunction)
public:
	SpringFunction();
	virtual ~SpringFunction();

public:
	virtual BOOL Execute();

public:
	void SpringDH(Variable* pVariable){
		ASSERT(pVariable);
		m_pSpringPartDH = pVariable;
	}

private:
	void SetRegularParam(SpringSelRegular* pRegular);
	INT GetSpringNum();
	BOOL SelSpringPart(Spring* pSpring);
	BOOL FirstPartPriorityStratigy(Spring* pSpring);
	INT GetPartSpringNum(SpringFunction* pFunction);

private:
	Variable* m_pSpringPartDH;
};

#endif // !defined(AFX_SPRINGFUNCTION_H__43CA574D_AE80_4335_981E_D3F64A355717__INCLUDED_)
